<{if $goodsData}>
<input type="hidden" class="action-pagedata" value="{total:<{$total}>, pagecurrent:<{$page}>, pagetotal:<{$pagetotal}>}">
  <{foreach from=$goodsData key=key item=goods_row}>
    <div class="col-50 margin_lr nopadding" style="padding: 0 10px 0 10px;margin-left: 0px;width: 50%;margin-bottom: 0.2rem">
        <a href="<{link app=b2c ctl=wap_product arg0=$goods_row.products.product_id}>">
            <div class="goods_img_box">
                <img src="<{$goods_row.image_default_id|storager:'s'}>">
                <{if $goods_row.zhelv}>
                <div class="goods_discount_bg">
                    <div class="goods_discount_text"><{$goods_row.zhelv}>折</div>
                </div>
                <{/if}>
            </div>
            <div class="col-50-bottom">
                <div class="goods_model"><{$goods_row.name}></div>
                <div class="goods_stock">库存:<{$goods_row.jxc_store}><{$goods_row.unit}></div>
                <div class="clearfix"></div>
                <div class="">
                    <{if $goods_row.NoShow}>
                        <div class="bottom_price_no" style="color: red;">
                            ¥注册会员可见
                        </div>
                    <{else}>
                        <div class="goods_price_new"><{$goods_row.products.price|cur}></div>
                        <{if $goods_row.products.mktprice > 0}>
                        <div class="goods_price_old"><{$goods_row.products.mktprice|cur_odr}></div>
                        <{/if}>
                        <div class="clearfix"></div>
                    <{/if}>
                </div>
            </div>
        </a>
    </div>
  <{/foreach}>
<{wap_pagers ajax=true data=$pager}>
<{else}>
<div class="no-data" style="text-align: center;">
    <p class="warn">抱歉！没有符合条件的商品</p>
    <p>您可以更改关键字重新查找</p>
</div>
<{/if}>
<script>
    window.onload=function(){
        var divs = document.getElementsByClassName('self-adaption');
        for (var i = divs.length - 1; i >= 0; i--) {
            divs[i].style.width=(screen.width)*0.44+"px";
            divs[i].style.height=(screen.height)*0.247+"px";
        }
    }
    // $(document).ready(function(){
    //     var divs = document.getElementsByClassName('self-adaption');
    //         console.log(divs.length);
    //     for (var i = divs.length - 1; i >= 0; i--) {
    //         console.log(screen.width);
    //         console.log(screen.height);
    //         divs[i].style.width=(screen.width)*0.44+"px";
    //         divs[i].style.height=(screen.height)*0.24+"px";
    //     }
    // })
</script>